<?php

/**
 * Yii Controller AccessLogController
 *
 * @author nguyenmanhluu
 * @since Aug 9, 2013 - 12:59:25 AM
 */
class AccessLogController extends CrudController
{

    public $modelName   = 'AccessLog';
    public $title       = 'Access Log';
    public $listColumns = array(
        'time' => array(
            'value' => 'date("d/m/Y H:i:s",$item->time)'
        ),
        'role' => '',
        'name' => '',
        'ip'   => array(
            'value' => 'long2ip($item->ip)'
        ),
    );
    public $formColumns = array(
        'time' => '',
        'role' => '',
        'name' => '',
        'ip'   => '',
    );

    public function criteria()
    {
        $rtn        = new CDbCriteria();
        $rtn->order = 'id DESC';
        return $rtn;
    }

}

/** 
 * End file AccessLogController
 */
